<?php
$page = $_GET['page'];

if($page=='library')
{
    $userType = $_COOKIE['userType'];

    if($userType == superadministrator)
    {
            //echo"'<script>document.location.href='deletelibrarylist.php'</script>'";
        echo"'<script>document.location.href='libentry.php'</script>'";
    }
    else
    {
        echo"<script> alert('Sorry you have no priviledge to add library!');</script>";
        echo"'<script>document.location.href='libprofileview.php'</script>'";
    }
//     $host  = $_SERVER['HTTP_HOST'];
//     $uri  = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
//     $extra = 'libentry.php';
//     header("Location: http://$host$uri/$extra");

}
if($page=='client')
{
    $host  = $_SERVER['HTTP_HOST'];
    $uri  = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
    $extra = 'cliententry.php';
    header("Location: http://$host$uri/$extra");
}
if($page=='catalog')
{
    $host  = $_SERVER['HTTP_HOST'];
    $uri  = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
    $extra = 'catalogentry.php';
    header("Location: http://$host$uri/$extra");
}
if($page=='admin')
{
    $host  = $_SERVER['HTTP_HOST'];
    $uri  = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
    $extra = 'adminentry.php';
    header("Location: http://$host$uri/$extra");
}
if($page=='news')
{
    $host  = $_SERVER['HTTP_HOST'];
    $uri  = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
    $extra = 'newsentry.php';
    header("Location: http://$host$uri/$extra");
}
?>
